package cn.edu.neusoft.yuejian4.yuejian_4.model;



import java.util.List;

import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Signup;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Success;
import cn.edu.neusoft.yuejian4.yuejian_4.javaBean.Train;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.List_TListener;
import cn.edu.neusoft.yuejian4.yuejian_4.listener.TListener;
import retrofit2.Call;

/**
 * Created by Lix on 2018/10/1.
 */

public class TrainModel extends RetrofitBaseModel {

    public void allTrain(List_TListener<Train> listener){
        Call<List<Train>> call = service.alltrain();
        callenqueue_list(call,listener);
    }

    public void rumenTrain(List_TListener<Train> listener){
        Call<List<Train>> call = service.rumentrain();
        callenqueue_list(call,listener);
    }

    public void cainiaoTrain(List_TListener<Train> listener){
        Call<List<Train>> call = service.cainiaotrain();
        callenqueue_list(call,listener);
    }

    public void jinjieTrain(List_TListener<Train> listener){
        Call<List<Train>> call = service.jinjietrain();
        callenqueue_list(call,listener);
    }

    public void trainDetails(int trainid,TListener<Train> listener){
        Call<Train> call = service.train_detail(trainid);
        callenqueue(call,listener);
    }

    public void signup(int tid, int uid, TListener<Signup> listener){
        Call<Signup> call = service.trainsignup(tid,uid);
        callenqueue(call,listener);
    }
    public void jiesuan(int tid,int uid,int num,TListener<Success> listener){
        Call<Success> call = service.trainjiesuan(tid,uid,num);
        callenqueue(call,listener);
    }

    public void iscollection(int tid, int uid , TListener<Success> listener){
        Call<Success> call = service.trainIsCollection(tid,uid);
        callenqueue(call,listener);
    }
    public void collection(int tid, int uid , TListener<Success> listener){
        Call<Success> call = service.trainCollection(tid,uid);
        callenqueue(call,listener);
    }
    public void uncollection(int tid, int uid , TListener<Success> listener){
        Call<Success> call = service.trainUnCollection(tid,uid);
        callenqueue(call,listener);
    }
}

